/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package acceso.tags;

import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;

/**
 *
 * @author edavalos
 */
public class PagEspTag extends BodyTagSupport {

    private String cod;
    private String json; 

    @Override
    public int doStartTag() throws JspException {


        HttpSession s = pageContext.getSession();
        
        s.setAttribute(cod, json);

        return EVAL_PAGE;
    }

    /**
     * @return the cod
     */
    public String getCod() {
        return cod;
    }

    /**
     * @param cod the cod to set
     */
    public void setCod(String cod) {
        this.cod = cod;
    }

    /**
     * @return the json
     */
    public String getJson() {
        return json;
    }

    /**
     * @param json the json to set
     */
    public void setJson(String json) {
        this.json = json;
    }
}
